<?php
$headermsg = '\"HTTP/1.0 '.$code[0].' '.$code[1].'\"';
header($headermsg);
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<ratings>";
foreach($ratings as $rating){
echo "<rating ";
echo "id=\"".$rating['Rating']['id']."\" ";
echo "photo_id=\"".$rating['Rating']['photo_id']."\" ";
echo "user_id=\"".$rating['Rating']['user_id']."\" ";
echo "value=\"".$rating['Rating']['value']."\"/>";
}
echo "</ratings>";
?>